* {
    box-sizing: border-box;
}

html ::-webkit-scrollbar-thumb {
/*    background-color: ;*/
    background-color: var(--fht-scrollbar-thumb, var(--lx-accent-05, color-mix(in srgb, var(--ls-scrollbar-thumb-hover-color) 50%, transparent)));
}

html ::-webkit-scrollbar {
    background-color: transparent;
    height: 8px;
    width: 6px;
}

html ::-webkit-scrollbar-thumb:active {
    background-color: var(--fht-scrollbar-thumb-hover, var(--lx-accent-09, var(--ls-scrollbar-thumb-hover-color)));
}

html ::-webkit-scrollbar-corner {
    background: 0 0;
}

div {
    color: var(--ls-primary-text-color);
    font-size: var(--ls-page-text-size);
    font-family: var(--ls-font-family),sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;

    display: block;
}

#overlay {
    z-index: -1;

    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;

    background-color: var(--ls-tertiary-background-color);
    background-color: var(--ls-quaternary-background-color);
    opacity: 0;  /* will be set at runtime */

    transition-duration: .15s;
    transition-property: opacity;
    transition-timing-function: ease-in;
}

#modal {
    z-index: 999;

    display: flex;
    align-items: baseline;
    justify-content: center;

    padding-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;

    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 15vh;
}

#panel {
    background: var(--ls-secondary-background-color);

    box-shadow: 0 0 #0000, 0 0 #0000, 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
    border: 1px solid var(--ls-border-color);
    border-radius: 8px;

    overflow: hidden;
    position: relative;

    transition-timing-function: ease-out;
    transition-duration: .15s;
    transition-property: all;

    opacity: 0;  /* will be set at runtime */
}

#panel-content {
    min-width: 35em;
    overflow-x: hidden;
    overflow-y: overlay;
    padding: 2rem;
    width: auto;
}

#content {
    display: flex;
    flex-direction: column;
    margin: -2rem;
    max-height: 72vh;
    overflow: hidden;
}

#input-wrap {
    height: 64px;
}

#search-query-input {
    font-size: var(--ls-page-text-size);
    font-family: var(--ls-font-family);

    border: none;
    border-radius: 0;

    color: var(--ls-secondary-text-color);

    background: 0 0;
    appearance: none;

    line-height: 1.5rem;

    outline: 0;
    padding: 16px;
    margin: 0;

    width: 100%;
    height: 100%;
}

#search-query-input:focus {
    box-shadow: none;
}


#results-wrap {
    max-height: calc(75vh - 64px);
    overflow-x: hidden;
    overflow-y: auto;
}

#items {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

.nothing {
    padding-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.item {
    word-break: break-all;

    background: 0 0;
    border: none;
    border-radius: unset!important;
    transition: none;

    color: var(--ls-primary-text-color);

    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;

    cursor: pointer;

    font-size: .875rem;
    line-height: 1.25rem;

    padding-bottom: 0.2rem;
    padding-top: 0.3rem;

    padding-left: 1rem;
    padding-right: 1rem;

    justify-content: space-between;

    display: flex;

    color: var(--ls-link-text-color);
    cursor: pointer;
    text-decoration: none;
}

.item > span {
    flex: 1 1 0%;
}

.selected {
    word-break: break-all;
    background-color: var(--fht-active, var(--lx-accent-05, var(--ls-quaternary-background-color)));
}

.selected span {
    color: var(--fht-active-text, var(--lx-accent-11, var(--ls-secondary-text-color)));
}

.item.selected.will-open:hover {
    cursor: e-resize;
}

.cell {
    align-items: center;
    width: 100%;
    display: inline-grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cell-left {
    display: flex;
    grid-row: 1;
    grid-column: 1/span 3;
}

.cell-under {
    display: flex;
    grid-row: 2;
    grid-column: 1/span 3;

    opacity: .5;
    font-size: 12px;
}

.cell-right {
    justify-content: flex-end;
    grid-row: 1/span 2;
    grid-column: span 1/span 1;

    display: inline-grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.label {
    grid-row: 1;
    grid-column: 1/span 1;

    display: flex;
    justify-content: flex-end;

    white-space: nowrap;
    opacity: .4;

    border-radius: var(--ls-border-radius-low);
    -webkit-border-radius: var(--ls-border-radius-low);
    line-height: 1.45;

    color: var(--fht-label-text, var(--lx-accent-11, var(--ls-page-inline-code-color)));
    font-family: MonoLisa,Fira Code,Monaco,Menlo,Consolas,COURIER NEW,monospace;
    font-size: .9em;
    font-style: normal;
    letter-spacing: 0;
    text-rendering: optimizeSpeed;
}

.shortcut {
    grid-row: 2;
    grid-column: 1/span 1;

    display: inline-flex;
    margin-left: auto;

    gap: 0.1rem;
    opacity: 0.8;
}

.shortcut.mac > .tile {
    letter-spacing: 2px;
}

.shortcut > .tile {
    display: inline-flex;
    height: 1.25rem;

    font-family: system-ui;
    line-height: 1rem;
    font-weight: 400;
    font-size: .75rem;

    padding: 0 0.25rem 0 0.375rem;
    border-radius: 0.25rem;

    white-space: nowrap;
    justify-content: center;
    align-items: center;

    color: var(--ls-primary-text-color);
    background-color: var(--ls-quaternary-background-color);
    box-shadow: inset 0 1px 0 0 hsla(0,0%,100%,.15), inset 0 -1px 0 0 rgba(0,0,0,.15);
}
.item.selected .shortcut {
    opacity: 1;
}
.item.selected .shortcut > .tile {
    background-color: var(--ls-tertiary-background-color);
    box-shadow: inset 0 1px 0 0 hsla(0,0%,100%,.20), inset 0 -1px 0 0 rgba(0,0,0,.25);
}

mark {
    background-color: var(--fht-hightlight, var(--lx-accent-09-alpha, var(--ls-page-mark-bg-color)));
    color: var(--ls-page-mark-color);
}

footer {
    display: flex;
    align-items: center;

    min-height: 28px;

    margin-left: 12px;
    margin-right: 12px;
}

footer > ul {
    padding: 0px;
    margin: 0px;

    font-size: 12px;
    opacity: .7;
}

footer > ul > li {
    display: inline;
    margin-right: 16px;
    color: var(--fht-footer-text, var(--lx-accent-09, var(--ls-page-inline-code-color)));
}

footer > ul > li > svg {
    width: 12px;
    height: 12px;

    display: inline;
    margin-right: 4px;
    margin-bottom: -2px;

    fill: var(--fht-footer-text, var(--lx-accent-09, var(--ls-page-inline-code-color)));
}

footer > ul > li > span {
    font-size: 11px;
    padding-right: 1px;
}
